﻿@{
    ViewBag.Page = "person";
    Layout = "~/Views/Shared/_PersionLayout.cshtml";
    ViewBag.Menu = "email";
    if (Model != null && !string.IsNullOrWhiteSpace(Model.address))
    {
        <div class="pos"><img src="~/images/images/pay_dian.jpg" /> <a href="#">会员中心</a> - 安全邮箱绑定</div>
        <div class="form1" style="background:none;">
            <p style="margin:60px 0 0 0;" class="tc"><img src="~/images/images/safe_img1.jpg" /></p>
            <p style="margin:20px 0 0 0;" class="tc">您的邮箱：<font color="red">@Model.address.Substring(0, 3)*********@Model.address.Substring(Model.address.IndexOf('@'))</font>（已绑定）</p>
            <p style="margin:20px 0 0 0;" class="tc c999">安全邮箱是申请密码找回，装备找回等服务的重要凭证，请务必填写并牢记；</p>
        </div>
    }
    else
    {
        @section HeadJavaScript{
            <script src="~/Scripts/angular/base/angular.min.js" type="text/javascript"></script>
            <!--[if (IE 6)|(IE 7)]><script type="text/javascript" src="~/Scripts/angular/base/json2.js"></script><![endif]-->
            <script src="~/Scripts/angular/js/mail.js" type="text/javascript"></script>
            <script src="~/Scripts/angular/base/angular.autoload.js" type="text/javascript"></script>
        }
        <div class="pos"><img src="~/images/images/pay_dian.jpg" /> <a href="#">会员中心</a> - 安全邮箱绑定</div>
		<div class="form1" style="background:none;">
                <form name="form" on-submit="submit()" onsubmit="return false;" ng-controller="Ctrl" ng-init="load({
                    email: { msg: '请填写您常用的邮箱，推荐使用QQ邮箱！',pattern:'对不起，您输入的邮箱格式有误！',error: '请正确填写您的邮箱',success:true}
                    ,verifyvalue: { msg:'请输入图片显示的数字或字母',error: '请正确填写验证码',success:true}
                    ,submit:{verifycode:'验证码错误',mail:'请填写正确的邮箱',identity:'用户身份错误,请重新登录',error:'系统异常，请联系我们'}
                });
                    submit.url = '/user/addemail/@ViewData["code"]';
                "
                >
                <table class="tab1" width="720">
                        <tr>
                            <td width="115">
                            <span class="txtr">邮箱：</span> 
                            </td>
                            <td width="270">
                                <input class="text270" type="text" name="email" ng-init="email.input()" on-focus="email.input()" on-blur="email.validate();" ng-model="email.value" ng-pattern="email.pattern" required/>          
					    
                            </td>
                            <td>
                                <span class="label2" ng-show="!email.error&&!email.success&&email.msg" style="display:none;">{{email.msg}}</span>
					            <span class="red1" ng-show="email.error" style="display:none;"><img src="~/images/images/error.jpg" /> {{email.error}}</span>
					            <span ng-show="email.success" style="display:none;"><img src="~/images/images/right.jpg" /> </span>
                            </td>
                        </tr>
                        <tr>
                            <td><span class="txtr">验证码：</span> </td>
                            <td>
                                <input class="text270" type="text" name="verifyvalue" ng-init="verifyvalue.input()" on-focus="verifyvalue.input()" on-blur="verifyvalue.validate();" ng-model="verifyvalue.value" ng-pattern="verifyvalue.pattern" required />
					    
                            </td>
                            <td>
                                <span class="label2" ng-show="!verifyvalue.error&&!verifyvalue.success&&verifyvalue.msg" style="display:none;"> {{verifyvalue.msg}}</span>
					            <span class="red1" ng-show="verifyvalue.error" style="display:none;"><img src="~/images/images/error.jpg" /{{verifyvalue.error}}</span>
					            <span ng-show="verifyvalue.success" style="display:none;"><img src="~/images/images/right.jpg" /></span>
                            </td>
                        </tr>
                       <tr>
                            <td><span class="txtr">验证码图片：</span> </td>
                            <td>
                            <img style="border:1px solid #000;" ng-src="{{verifycode.value}}" ng-click="verifycode.newdefault()" alt="verifycode"/>
                            <a ng-click="verifycode.newdefault()" style="color:#898989; text-decoration:none;">看不清楚，换一张</a>
                            </td>
                            <td>
                        	
                            </td>
                        </tr>
                        <tr ng-show="submit.error" style="display:none">
                    	    <td></td>
                            <td colspan="2">
                        	  <span class="error">{{submit.error}}</span> 
                            </td>
                        </tr>
                        <tr>
                    	    <td></td>
                            <td align="center">
                        	    <input type="submit" value="" class="safe_tj" />
                            </td>
                            <td></td>
                        </tr>
                </table>
                <p style="margin:20px 0 0 40px;" class="c999">安全邮箱是申请密码找回，装备找回等服务的重要凭证，请务必填写并牢记；</p>
		    </form>
	    </div>
    }
}